package com.smartjobs.model;

import com.smartjobs.util.DBManager;

public class CreateCompanyProfileModel {
	
	String companyName;
	String password;
	String emailID;
	int mobileNumber;
	
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmailID() {
		return emailID;
	}
	public void setEmailID(String emailID) {
		this.emailID = emailID;
	}
	public int getMobileNumber() {
		return mobileNumber;
	}
	public void setMobileNumber(int mobileNumber) {
		this.mobileNumber = mobileNumber;
	}
	
	public boolean insertIntoDB(CreateCompanyProfileModel companyProfile) {
		String query = "insert into companyprofile (companyName,emailId,companyPassword,phoneNumber) values ('"
				+ companyProfile.companyName
				+ "','"
				+ companyProfile.emailID
				+ "','"
				+ companyProfile.password
				+ "',"
				+ companyProfile.mobileNumber + ")";

		boolean result = DBManager.insertIntoDB(query);

		if (result)
			return true;
		else
			return false;

	}

}
